#pragma once

#include "Widgets/Widget.h"
#include "ColorPickerWidget.m.h"


class RRectangleWidget;
class RSpinBox;

RCLASS()
class WHENGINE_API RColorPickerWidget : public RWidget
{
    ROBJECT

public:
    RColorPickerWidget();

    void SetColor(const SColor& InColor);

    SColor GetColor() const;

    TDelegate<void,const SColor&> OnColorConfirmed;
protected:
    //current Color
    SColor Color;

    TWeakObjectPtr<RRectangleWidget> Preview;
    
    TWeakObjectPtr<RSpinBox> R;
    TWeakObjectPtr<RSpinBox> G;
    TWeakObjectPtr<RSpinBox> B;
    TWeakObjectPtr<RSpinBox> A;


};